import request from '@/utils/request'

const prePath = '/his'

export function getAllDataPage(params) {
  return request({
    url: prePath + '/hisDepotStorage/pageList',
    method: 'get',
    params,
  })
}

export function checkAlive() {
  return request({
    url: prePath + '/hisDepotStorage/checkClientAlive',
    method: 'get',
  })
}

export function reStart() {
  return request({
    url: prePath + '/hisDepotStorage/reStartClient',
    method: 'get',
  })
}

export function stopClient() {
  return request({
    url: prePath + '/hisDepotStorage/stopClient',
    method: 'get',
  })
}

export function updateNoneProPrice(params) {
  return request({
    url: prePath + '/hisDepotStorage/updatePrice',
    method: 'get',
    params,
  })
}

export function pcode(params) {
  return request({
    url: prePath + '/hisDepotStorage/pcode',
    method: 'get',
    params,
  })
}

export function hisLogPage(params) {
  return request({
    url: prePath + '/hisRequestLog/page',
    method: 'get',
    params,
  })
}

export function hisErrorPage(params) {
  return request({
    url: prePath + '/hisRequestLog/sticError',
    method: 'get',
    params,
  })
}

//配置页查询
export function multConfigPage(params) {
  return request({
    url: prePath + '/hisMultConfig/page',
    method: 'get',
    params,
  })
}

//新增
export function multConfigAdd(data) {
  return request({
    url: prePath + '/hisMultConfig',
    method: 'post',
    data,
  })
}

//启用
export function multConfigEnable(params) {
  return request({
    url: prePath + '/hisMultConfig/enable/' + params,
    method: 'get',
  })
}

//推送
export function multConfigPush(params) {
  return request({
    url: prePath + '/hisMultConfig/push/' + params,
    method: 'get',
  })
}

//停用
export function multConfigDisable(params) {
  return request({
    url: prePath + '/hisMultConfig/disable/' + params,
    method: 'get',
  })
}

/***  多次扣费日志   **/
//分页查询
export function multConsumeTimePage(params) {
  return request({
    url: prePath + '/multConsumeTime/page',
    method: 'get',
    params,
  })
}

//查询明细
export function multConsumeTimeLoad(params) {
  return request({
    url: prePath + '/multConsumeTime/load/' + params,
    method: 'get',
  })
}

export function getSfxxmPage(params) {
  return request({
    url: prePath + '/sfxxm/page/',
    method: 'get',
    params,
  })
}

export function getSfxxmNow(params) {
  return request({
    url: prePath + '/sfxxm/getSfxxmNow/',
    method: 'get',
    params,
  })
}

export function postSfxxmRetry(data) {
  return request({
    url: prePath + '/sfxxm/retry/',
    method: 'post',
    data,
  })
}

export function postSfxxmClose(data) {
  return request({
    url: prePath + '/sfxxm/close/',
    method: 'post',
    data,
  })
}

export function getPreExportOrderPage(params) {
  return request({
    url: prePath + '/hisPreExportOrder/page/',
    method: 'get',
    params,
  })
}

export function detailPreExportOrderPage(id) {
  return request({
    url: prePath + '/hisPreExportOrder/' + id,
    method: 'get',
  })
}

export function getPreExportOrderAll(params) {
  return request({
    url: prePath + '/hisPreExportOrder/all/',
    method: 'get',
    params,
  })
}

export function getPreExportOrderDetailAll(params) {
  return request({
    url: prePath + '/hisPreExportOrderDetail/all/',
    method: 'get',
    params,
  })
}

export function getChargeItemRecord(id) {
  return request({
    url: prePath + '/chargeItemRecord/' + id,
    method: 'get',
  })
}

export function getChargeItemConsume(data) {
  return request({
    url: prePath + '/chargeItemRecord/consumeRecord/',
    method: 'post',
    data,
  })
}

export function postPreOrderThaw(data) {
  return request({
    url: prePath + '/hisPreExportOrder/thaw/',
    method: 'post',
    data,
  })
}

//his计费信息
export function getHisCustomizeListPage(data) {
  return request({
    url: prePath + '/customizeList/page',
    method: 'post',
    data,
  })
}
export function getHisCustomizeListPageForDeal(data) {
  return request({
    url: prePath + '/customizeList/pageForDeal',
    method: 'post',
    data,
  })
}
//his计费信息匹配
export function hisStockLockMatch(data) {
  return request({
    url: prePath + '/stockLock/match',
    method: 'post',
    data,
  })
}
//his计费信息补录
export function hisStockLockSupplement(data) {
  return request({
    url: prePath + '/stockLock/supplement',
    method: 'post',
    data,
  })
}
//his计费信息取消
export function hisStockLockCancel(data) {
  return request({
    url: prePath + '/stockLock/cancel',
    method: 'post',
    data,
  })
}
//his计费信息扫描
export function hisStockLockScan(data) {
  return request({
    url: prePath + '/stockLock/scan',
    method: 'post',
    data,
  })
}
//his计费信息导出
export function hisExcel(data) {
  return request({
    url: prePath + '/excel',
    responseType: 'blob',
    method: 'post',
    data,
  })
}
